<% use_page_title "Versions: '#{@page.name}' Page" %>
<%= render layout: 'page_title' do %>
    <%= link_to "Back to Page", :back, class: 'btn btn-small right' %>
<% end %>
<%= render layout: 'main_content' do %>
    <table class="data table table-rounded table-bordered table-hover table-striped">
      <thead>
      <tr>
        <th>Version</th>
        <th>Comment</th>
        <th>Date</th>
        <th>Editor</th>
        <th>Action</th>
      </tr>
      </thead>
      <tbody>
      <% @page.versions.order("version desc").each_with_index do |r, i| %>
          <%= render partial: 'version', locals: {revision: r, original: @page,  i: i} %>
      <% end %>
      </tbody>
    </table>
<% end %>
